\(\int \frac {(a g+b g x)^2 (A+B \log (e (\frac {a+b x}{c+d x})^n))^2}{(c i+d i x)^3} \, dx\) [203]
Optimal result
Integrand size = 45, antiderivative size = 441 \[
\int \frac {(a g+b g x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(c i+d i x)^3} \, dx=-\frac {B^2 g^2 n^2 (a+b x)^2}{4 d i^3 (c+d x)^2}+\frac {2 A b B g^2 n (a+b x)}{d^2 i^3 (c+d x)}-\frac {2 b B^2 g^2 n^2 (a+b x)}{d^2 i^3 (c+d x)}+\frac {2 b B^2 g^2 n (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{d^2 i^3 (c+d x)}+\frac {B g^2 n (a+b x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{2 d i^3 (c+d x)^2}-\frac {g^2 (a+b x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{2 d i^3 (c+d x)^2}-\frac {b g^2 (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{d^2 i^3 (c+d x)}-\frac {b^2 g^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2 \log \left (\frac {b c-a d}{b (c+d x)}\right )}{d^3 i^3}-\frac {2 b^2 B g^2 n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right )}{d^3 i^3}+\frac {2 b^2 B^2 g^2 n^2 \operatorname {PolyLog}\left (3,\frac {d (a+b x)}{b (c+d x)}\right )}{d^3 i^3}
\]
[Out]
-1/4*B^2*g^2*n^2*(b*x+a)^2/d/i^3/(d*x+c)^2+2*A*b*B*g^2*n*(b*x+a)/d^2/i^3/(d*x+c)-2*b*B^2*g^2*n^2*(b*x+a)/d^2/i
^3/(d*x+c)+2*b*B^2*g^2*n*(b*x+a)*ln(e*((b*x+a)/(d*x+c))^n)/d^2/i^3/(d*x+c)+1/2*B*g^2*n*(b*x+a)^2*(A+B*ln(e*((b
*x+a)/(d*x+c))^n))/d/i^3/(d*x+c)^2-1/2*g^2*(b*x+a)^2*(A+B*ln(e*((b*x+a)/(d*x+c))^n))^2/d/i^3/(d*x+c)^2-b*g^2*(
b*x+a)*(A+B*ln(e*((b*x+a)/(d*x+c))^n))^2/d^2/i^3/(d*x+c)-b^2*g^2*(A+B*ln(e*((b*x+a)/(d*x+c))^n))^2*ln((-a*d+b*
c)/b/(d*x+c))/d^3/i^3-2*b^2*B*g^2*n*(A+B*ln(e*((b*x+a)/(d*x+c))^n))*polylog(2,d*(b*x+a)/b/(d*x+c))/d^3/i^3+2*b
^2*B^2*g^2*n^2*polylog(3,d*(b*x+a)/b/(d*x+c))/d^3/i^3
Rubi [A] (verified)
Time = 0.30 (sec) , antiderivative size = 441, normalized size of antiderivative = 1.00, number of
steps used = 11, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {2561, 2395, 2333, 2332, 2342,
2341, 2354, 2421, 6724} \[
\int \frac {(a g+b g x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(c i+d i x)^3} \, dx=-\frac {2 b^2 B g^2 n \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{d^3 i^3}-\frac {b^2 g^2 \log \left (\frac {b c-a d}{b (c+d x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{d^3 i^3}-\frac {b g^2 (a+b x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{d^2 i^3 (c+d x)}+\frac {2 A b B g^2 n (a+b x)}{d^2 i^3 (c+d x)}-\frac {g^2 (a+b x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{2 d i^3 (c+d x)^2}+\frac {B g^2 n (a+b x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{2 d i^3 (c+d x)^2}+\frac {2 b^2 B^2 g^2 n^2 \operatorname {PolyLog}\left (3,\frac {d (a+b x)}{b (c+d x)}\right )}{d^3 i^3}+\frac {2 b B^2 g^2 n (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{d^2 i^3 (c+d x)}-\frac {2 b B^2 g^2 n^2 (a+b x)}{d^2 i^3 (c+d x)}-\frac {B^2 g^2 n^2 (a+b x)^2}{4 d i^3 (c+d x)^2}
\]
[In]
Int[((a*g + b*g*x)^2*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2)/(c*i + d*i*x)^3,x]
[Out]
-1/4*(B^2*g^2*n^2*(a + b*x)^2)/(d*i^3*(c + d*x)^2) + (2*A*b*B*g^2*n*(a + b*x))/(d^2*i^3*(c + d*x)) - (2*b*B^2*
g^2*n^2*(a + b*x))/(d^2*i^3*(c + d*x)) + (2*b*B^2*g^2*n*(a + b*x)*Log[e*((a + b*x)/(c + d*x))^n])/(d^2*i^3*(c
+ d*x)) + (B*g^2*n*(a + b*x)^2*(A + B*Log[e*((a + b*x)/(c + d*x))^n]))/(2*d*i^3*(c + d*x)^2) - (g^2*(a + b*x)^
2*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2)/(2*d*i^3*(c + d*x)^2) - (b*g^2*(a + b*x)*(A + B*Log[e*((a + b*x)/(
c + d*x))^n])^2)/(d^2*i^3*(c + d*x)) - (b^2*g^2*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2*Log[(b*c - a*d)/(b*(c
+ d*x))])/(d^3*i^3) - (2*b^2*B*g^2*n*(A + B*Log[e*((a + b*x)/(c + d*x))^n])*PolyLog[2, (d*(a + b*x))/(b*(c +
d*x))])/(d^3*i^3) + (2*b^2*B^2*g^2*n^2*PolyLog[3, (d*(a + b*x))/(b*(c + d*x))])/(d^3*i^3)
Rule 2332
Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]
Rule 2333
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]
Rule 2341
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^
n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^(m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]
Rule 2342
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Lo
g[c*x^n])^p/(d*(m + 1))), x] - Dist[b*n*(p/(m + 1)), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]
Rule 2354
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[Log[1 + e*(x/d)]*((a +
b*Log[c*x^n])^p/e), x] - Dist[b*n*(p/e), Int[Log[1 + e*(x/d)]*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]
Rule 2395
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol]
:> With[{u = ExpandIntegrand[(a + b*Log[c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[
{a, b, c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[m] && IntegerQ[r
]))
Rule 2421
Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> Simp
[(-PolyLog[2, (-d)*f*x^m])*((a + b*Log[c*x^n])^p/m), x] + Dist[b*n*(p/m), Int[PolyLog[2, (-d)*f*x^m]*((a + b*L
og[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]
Rule 2561
Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*(B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m
_.)*((h_.) + (i_.)*(x_))^(q_.), x_Symbol] :> Dist[(b*c - a*d)^(m + q + 1)*(g/b)^m*(i/d)^q, Subst[Int[x^m*((A +
B*Log[e*x^n])^p/(b - d*x)^(m + q + 2)), x], x, (a + b*x)/(c + d*x)], x] /; FreeQ[{a, b, c, d, e, f, g, h, i,
A, B, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[b*f - a*g, 0] && EqQ[d*h - c*i, 0] && IntegersQ[m, q]
Rule 6724
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]
Rubi steps \begin{align*}
\text {integral}& = \frac {g^2 \text {Subst}\left (\int \frac {x^2 \left (A+B \log \left (e x^n\right )\right )^2}{b-d x} \, dx,x,\frac {a+b x}{c+d x}\right )}{i^3} \\ & = \frac {g^2 \text {Subst}\left (\int \left (-\frac {b \left (A+B \log \left (e x^n\right )\right )^2}{d^2}-\frac {x \left (A+B \log \left (e x^n\right )\right )^2}{d}-\frac {b^2 \left (A+B \log \left (e x^n\right )\right )^2}{d^2 (-b+d x)}\right ) \, dx,x,\frac {a+b x}{c+d x}\right )}{i^3} \\ & = -\frac {\left (b g^2\right ) \text {Subst}\left (\int \left (A+B \log \left (e x^n\right )\right )^2 \, dx,x,\frac {a+b x}{c+d x}\right )}{d^2 i^3}-\frac {\left (b^2 g^2\right ) \text {Subst}\left (\int \frac {\left (A+B \log \left (e x^n\right )\right )^2}{-b+d x} \, dx,x,\frac {a+b x}{c+d x}\right )}{d^2 i^3}-\frac {g^2 \text {Subst}\left (\int x \left (A+B \log \left (e x^n\right )\right )^2 \, dx,x,\frac {a+b x}{c+d x}\right )}{d i^3} \\ & = -\frac {g^2 (a+b x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{2 d i^3 (c+d x)^2}-\frac {b g^2 (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{d^2 i^3 (c+d x)}-\frac {b^2 g^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2 \log \left (\frac {b c-a d}{b (c+d x)}\right )}{d^3 i^3}+\frac {\left (2 b^2 B g^2 n\right ) \text {Subst}\left (\int \frac {\left (A+B \log \left (e x^n\right )\right ) \log \left (1-\frac {d x}{b}\right )}{x} \, dx,x,\frac {a+b x}{c+d x}\right )}{d^3 i^3}+\frac {\left (2 b B g^2 n\right ) \text {Subst}\left (\int \left (A+B \log \left (e x^n\right )\right ) \, dx,x,\frac {a+b x}{c+d x}\right )}{d^2 i^3}+\frac {\left (B g^2 n\right ) \text {Subst}\left (\int x \left (A+B \log \left (e x^n\right )\right ) \, dx,x,\frac {a+b x}{c+d x}\right )}{d i^3} \\ & = -\frac {B^2 g^2 n^2 (a+b x)^2}{4 d i^3 (c+d x)^2}+\frac {2 A b B g^2 n (a+b x)}{d^2 i^3 (c+d x)}+\frac {B g^2 n (a+b x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{2 d i^3 (c+d x)^2}-\frac {g^2 (a+b x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{2 d i^3 (c+d x)^2}-\frac {b g^2 (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{d^2 i^3 (c+d x)}-\frac {b^2 g^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2 \log \left (\frac {b c-a d}{b (c+d x)}\right )}{d^3 i^3}-\frac {2 b^2 B g^2 n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \text {Li}_2\left (\frac {d (a+b x)}{b (c+d x)}\right )}{d^3 i^3}+\frac {\left (2 b B^2 g^2 n\right ) \text {Subst}\left (\int \log \left (e x^n\right ) \, dx,x,\frac {a+b x}{c+d x}\right )}{d^2 i^3}+\frac {\left (2 b^2 B^2 g^2 n^2\right ) \text {Subst}\left (\int \frac {\text {Li}_2\left (\frac {d x}{b}\right )}{x} \, dx,x,\frac {a+b x}{c+d x}\right )}{d^3 i^3} \\ & = -\frac {B^2 g^2 n^2 (a+b x)^2}{4 d i^3 (c+d x)^2}+\frac {2 A b B g^2 n (a+b x)}{d^2 i^3 (c+d x)}-\frac {2 b B^2 g^2 n^2 (a+b x)}{d^2 i^3 (c+d x)}+\frac {2 b B^2 g^2 n (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{d^2 i^3 (c+d x)}+\frac {B g^2 n (a+b x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{2 d i^3 (c+d x)^2}-\frac {g^2 (a+b x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{2 d i^3 (c+d x)^2}-\frac {b g^2 (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{d^2 i^3 (c+d x)}-\frac {b^2 g^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2 \log \left (\frac {b c-a d}{b (c+d x)}\right )}{d^3 i^3}-\frac {2 b^2 B g^2 n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \text {Li}_2\left (\frac {d (a+b x)}{b (c+d x)}\right )}{d^3 i^3}+\frac {2 b^2 B^2 g^2 n^2 \text {Li}_3\left (\frac {d (a+b x)}{b (c+d x)}\right )}{d^3 i^3} \\
\end{align*}
Mathematica [B] (verified)
Leaf count is larger than twice the leaf count of optimal. \(3622\) vs. \(2(441)=882\).
Time = 4.78 (sec) , antiderivative size = 3622, normalized size of antiderivative = 8.21
\[
\int \frac {(a g+b g x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(c i+d i x)^3} \, dx=\text {Result too large to show}
\]
[In]
Integrate[((a*g + b*g*x)^2*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2)/(c*i + d*i*x)^3,x]
[Out]
(g^2*((-6*(b*c - a*d)^2*(A + B*Log[e*((a + b*x)/(c + d*x))^n] - B*n*Log[(a + b*x)/(c + d*x)])^2)/(c + d*x)^2 +
(24*b*(b*c - a*d)*(A + B*Log[e*((a + b*x)/(c + d*x))^n] - B*n*Log[(a + b*x)/(c + d*x)])^2)/(c + d*x) + 12*b^2
*(A + B*Log[e*((a + b*x)/(c + d*x))^n] - B*n*Log[(a + b*x)/(c + d*x)])^2*Log[c + d*x] + (12*a*b*B*d*n*(-A - B*
Log[e*((a + b*x)/(c + d*x))^n] + B*n*Log[(a + b*x)/(c + d*x)])*(-(b^2*c^3) + 4*a*b*c^2*d - 3*a^2*c*d^2 - 2*b^2
*c^2*d*x + 6*a*b*c*d^2*x - 4*a^2*d^3*x - 2*b*(b*c - 2*a*d)*(c + d*x)^2*Log[a + b*x] + 2*(b*c - a*d)^2*(c + 2*d
*x)*Log[(a + b*x)/(c + d*x)] + 2*b^2*c^3*Log[c + d*x] - 4*a*b*c^2*d*Log[c + d*x] + 4*b^2*c^2*d*x*Log[c + d*x]
- 8*a*b*c*d^2*x*Log[c + d*x] + 2*b^2*c*d^2*x^2*Log[c + d*x] - 4*a*b*d^3*x^2*Log[c + d*x]))/((b*c - a*d)^2*(c +
d*x)^2) + (6*a^2*B*d^2*n*(-A - B*Log[e*((a + b*x)/(c + d*x))^n] + B*n*Log[(a + b*x)/(c + d*x)])*(-(b^2*c^2) +
4*a*b*c*d - a^2*d^2 + 2*b^2*c*d*x + 2*a*b*d^2*x + 2*b^2*d^2*x^2 - 2*b^2*(c + d*x)^2*Log[a/b + x] + 2*(b*c - a
*d)^2*Log[(a + b*x)/(c + d*x)] + 2*b^2*c^2*Log[(b*(c + d*x))/(b*c - a*d)] + 4*b^2*c*d*x*Log[(b*(c + d*x))/(b*c
- a*d)] + 2*b^2*d^2*x^2*Log[(b*(c + d*x))/(b*c - a*d)]))/((b*c - a*d)^2*(c + d*x)^2) + 6*b^2*B*n*(A + B*Log[e
*((a + b*x)/(c + d*x))^n] - B*n*Log[(a + b*x)/(c + d*x)])*(-2*Log[c/d + x]^2 - (8*c*(1 + Log[c/d + x]))/(c + d
*x) + (c^2*(1 + 2*Log[c/d + x]))/(c + d*x)^2 + 8*c*(Log[a/b + x]/(c + d*x) + (b*(Log[a + b*x] - Log[c + d*x]))
/(-(b*c) + a*d)) + 2*(-Log[a/b + x] + Log[c/d + x] + Log[(a + b*x)/(c + d*x)])*((c*(3*c + 4*d*x))/(c + d*x)^2
+ 2*Log[c + d*x]) + (2*c^2*(-Log[a/b + x] + (b*(c + d*x)*(b*c - a*d + b*(c + d*x)*Log[a + b*x] - b*(c + d*x)*L
og[c + d*x]))/(b*c - a*d)^2))/(c + d*x)^2 + 4*(Log[a/b + x]*Log[(b*(c + d*x))/(b*c - a*d)] + PolyLog[2, (d*(a
+ b*x))/(-(b*c) + a*d)])) + (3*a^2*B^2*d^2*n^2*(-(b*c - a*d)^2 - 6*b*(b*c - a*d)*(c + d*x) - 6*b^2*(c + d*x)^2
*Log[a + b*x] - 2*b^2*(c + d*x)^2*Log[a + b*x]^2 + 2*(b*c - a*d)^2*Log[(a + b*x)/(c + d*x)] + 4*b*(b*c - a*d)*
(c + d*x)*Log[(a + b*x)/(c + d*x)] + 4*b^2*(c + d*x)^2*Log[a + b*x]*Log[(a + b*x)/(c + d*x)] - 2*(b*c - a*d)^2
*Log[(a + b*x)/(c + d*x)]^2 + 6*b^2*(c + d*x)^2*Log[c + d*x] + 4*b^2*(c + d*x)^2*Log[a + b*x]*Log[(b*(c + d*x)
)/(b*c - a*d)] - 4*b^2*(c + d*x)^2*Log[(d*(a + b*x))/(-(b*c) + a*d)]*Log[(b*c - a*d)/(b*c + b*d*x)] + 4*b^2*(c
+ d*x)^2*Log[(a + b*x)/(c + d*x)]*Log[(b*c - a*d)/(b*c + b*d*x)] - 2*b^2*(c + d*x)^2*Log[(b*c - a*d)/(b*c + b
*d*x)]^2 + 4*b^2*(c + d*x)^2*PolyLog[2, (d*(a + b*x))/(-(b*c) + a*d)] + 4*b^2*(c + d*x)^2*PolyLog[2, (b*(c + d
*x))/(b*c - a*d)]))/((b*c - a*d)^2*(c + d*x)^2) + (6*a*b*B^2*d*n^2*(-4*(b*c - a*d)^2*(c + d*x)*(2 + 2*Log[c/d
+ x] + Log[c/d + x]^2) + c*(b*c - a*d)^2*(1 + 2*Log[c/d + x] + 2*Log[c/d + x]^2) - 2*(b*c - a*d)^2*(c + 2*d*x)
*(-Log[a/b + x] + Log[c/d + x] + Log[(a + b*x)/(c + d*x)])^2 - 2*(Log[a/b + x] - Log[c/d + x] - Log[(a + b*x)/
(c + d*x)])*(4*(b*c - a*d)^2*(c + d*x)*(1 + Log[c/d + x]) - c*(b*c - a*d)^2*(1 + 2*Log[c/d + x]) - 4*(b*c - a*
d)*(c + d*x)*((b*c - a*d)*Log[a/b + x] - b*(c + d*x)*(Log[a + b*x] - Log[c + d*x])) + 2*c*((b*c - a*d)^2*Log[a
/b + x] - b*(c + d*x)*(b*c - a*d + b*(c + d*x)*Log[a + b*x] - b*(c + d*x)*Log[c + d*x]))) + 4*(b*c - a*d)*(c +
d*x)*(Log[a/b + x]*(d*(a + b*x)*Log[a/b + x] - 2*b*(c + d*x)*Log[(b*(c + d*x))/(b*c - a*d)]) - 2*b*(c + d*x)*
PolyLog[2, (d*(a + b*x))/(-(b*c) + a*d)]) + 2*c*((b*c - a*d)^2*Log[a/b + x]^2 - b*(c + d*x)*(b*(c + d*x)*Log[a
/b + x]^2 - 2*b*(c + d*x)*(Log[a + b*x] - Log[c + d*x]) - 2*Log[a/b + x]*(-(b*c) + a*d + b*(c + d*x)*Log[(b*(c
+ d*x))/(b*c - a*d)]) - 2*b*(c + d*x)*PolyLog[2, (d*(a + b*x))/(-(b*c) + a*d)])) + 4*(b*c - a*d)*(c + d*x)*(2
*(b*c - a*d)*Log[a/b + x]*(1 + Log[c/d + x]) + b*(c + d*x)*(Log[c/d + x]^2 - 2*Log[a + b*x] - 2*Log[c/d + x]*L
og[(d*(a + b*x))/(-(b*c) + a*d)] + 2*Log[c + d*x]) - 2*b*(c + d*x)*PolyLog[2, (b*(c + d*x))/(b*c - a*d)]) + 2*
c*(b*(b*c - a*d)*(c + d*x) - (b*c - a*d)^2*Log[a/b + x]*(1 + 2*Log[c/d + x]) + b^2*(c + d*x)^2*Log[a + b*x] -
b^2*(c + d*x)^2*Log[c + d*x] - b*(c + d*x)*(b*(c + d*x)*Log[c/d + x]^2 - 2*(b*c - a*d)*(1 + Log[c/d + x]) - 2*
b*(c + d*x)*(Log[c/d + x]*Log[(d*(a + b*x))/(-(b*c) + a*d)] + PolyLog[2, (b*(c + d*x))/(b*c - a*d)])))))/((b*c
- a*d)^2*(c + d*x)^2) + b^2*B^2*n^2*(4*Log[c/d + x]^3 + (24*c*(2 + 2*Log[c/d + x] + Log[c/d + x]^2))/(c + d*x
) - (3*c^2*(1 + 2*Log[c/d + x] + 2*Log[c/d + x]^2))/(c + d*x)^2 + (6*(-Log[a/b + x] + Log[c/d + x] + Log[(a +
b*x)/(c + d*x)])^2*(c*(3*c + 4*d*x) + 2*(c + d*x)^2*Log[c + d*x]))/(c + d*x)^2 + (24*c*(-(d*(a + b*x)*Log[a/b
+ x]^2) + 2*b*(c + d*x)*Log[a/b + x]*Log[(b*(c + d*x))/(b*c - a*d)] + 2*b*(c + d*x)*PolyLog[2, (d*(a + b*x))/(
-(b*c) + a*d)]))/((b*c - a*d)*(c + d*x)) + 6*(-Log[a/b + x] + Log[c/d + x] + Log[(a + b*x)/(c + d*x)])*((-2*c^
2*Log[a/b + x])/(c + d*x)^2 + (8*c*Log[a/b + x])/(c + d*x) - 2*Log[c/d + x]^2 - (8*c*(1 + Log[c/d + x]))/(c +
d*x) + (c^2*(1 + 2*Log[c/d + x]))/(c + d*x)^2 + (8*b*c*(-Log[a + b*x] + Log[c + d*x]))/(b*c - a*d) + (2*b*c^2*
(b*c - a*d + b*(c + d*x)*Log[a + b*x] - b*(c + d*x)*Log[c + d*x]))/((b*c - a*d)^2*(c + d*x)) + 4*(Log[a/b + x]
*Log[(b*(c + d*x))/(b*c - a*d)] + PolyLog[2, (d*(a + b*x))/(-(b*c) + a*d)])) + (6*c^2*(-Log[a/b + x]^2 + (b*(c
+ d*x)*(b*(c + d*x)*Log[a/b + x]^2 - 2*b*(c + d*x)*(Log[a + b*x] - Log[c + d*x]) - 2*Log[a/b + x]*(-(b*c) + a
*d + b*(c + d*x)*Log[(b*(c + d*x))/(b*c - a*d)]) - 2*b*(c + d*x)*PolyLog[2, (d*(a + b*x))/(-(b*c) + a*d)]))/(b
*c - a*d)^2))/(c + d*x)^2 + 12*(Log[a/b + x]^2*Log[(b*(c + d*x))/(b*c - a*d)] + 2*Log[a/b + x]*PolyLog[2, (d*(
a + b*x))/(-(b*c) + a*d)] - 2*PolyLog[3, (d*(a + b*x))/(-(b*c) + a*d)]) + 6*(2*Log[c/d + x]^2*(-Log[a/b + x] +
Log[(d*(a + b*x))/(-(b*c) + a*d)]) + 4*Log[c/d + x]*PolyLog[2, (b*(c + d*x))/(b*c - a*d)] + (4*c*(2*(b*c - a*
d)*Log[a/b + x]*(1 + Log[c/d + x]) + b*(c + d*x)*(Log[c/d + x]^2 - 2*Log[a + b*x] - 2*Log[c/d + x]*Log[(d*(a +
b*x))/(-(b*c) + a*d)] + 2*Log[c + d*x]) - 2*b*(c + d*x)*PolyLog[2, (b*(c + d*x))/(b*c - a*d)]))/((-(b*c) + a*
d)*(c + d*x)) + (c^2*(-(b*(b*c - a*d)*(c + d*x)) + (b*c - a*d)^2*Log[a/b + x]*(1 + 2*Log[c/d + x]) - b^2*(c +
d*x)^2*Log[a + b*x] + b^2*(c + d*x)^2*Log[c + d*x] + b*(c + d*x)*(b*(c + d*x)*Log[c/d + x]^2 - 2*(b*c - a*d)*(
1 + Log[c/d + x]) - 2*b*(c + d*x)*(Log[c/d + x]*Log[(d*(a + b*x))/(-(b*c) + a*d)] + PolyLog[2, (b*(c + d*x))/(
b*c - a*d)]))))/((b*c - a*d)^2*(c + d*x)^2) - 4*PolyLog[3, (b*(c + d*x))/(b*c - a*d)]))))/(12*d^3*i^3)
Maple [F]
\[\int \frac {\left (b g x +a g \right )^{2} {\left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )}^{2}}{\left (d i x +c i \right )^{3}}d x\]
[In]
int((b*g*x+a*g)^2*(A+B*ln(e*((b*x+a)/(d*x+c))^n))^2/(d*i*x+c*i)^3,x)
[Out]
int((b*g*x+a*g)^2*(A+B*ln(e*((b*x+a)/(d*x+c))^n))^2/(d*i*x+c*i)^3,x)
Fricas [F]
\[
\int \frac {(a g+b g x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(c i+d i x)^3} \, dx=\int { \frac {{\left (b g x + a g\right )}^{2} {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )}^{2}}{{\left (d i x + c i\right )}^{3}} \,d x }
\]
[In]
integrate((b*g*x+a*g)^2*(A+B*log(e*((b*x+a)/(d*x+c))^n))^2/(d*i*x+c*i)^3,x, algorithm="fricas")
[Out]
integral((A^2*b^2*g^2*x^2 + 2*A^2*a*b*g^2*x + A^2*a^2*g^2 + (B^2*b^2*g^2*x^2 + 2*B^2*a*b*g^2*x + B^2*a^2*g^2)*
log(e*((b*x + a)/(d*x + c))^n)^2 + 2*(A*B*b^2*g^2*x^2 + 2*A*B*a*b*g^2*x + A*B*a^2*g^2)*log(e*((b*x + a)/(d*x +
c))^n))/(d^3*i^3*x^3 + 3*c*d^2*i^3*x^2 + 3*c^2*d*i^3*x + c^3*i^3), x)
Sympy [F]
\[
\int \frac {(a g+b g x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(c i+d i x)^3} \, dx=\frac {g^{2} \left (\int \frac {A^{2} a^{2}}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\, dx + \int \frac {A^{2} b^{2} x^{2}}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\, dx + \int \frac {B^{2} a^{2} \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}^{2}}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\, dx + \int \frac {2 A B a^{2} \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\, dx + \int \frac {2 A^{2} a b x}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\, dx + \int \frac {B^{2} b^{2} x^{2} \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}^{2}}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\, dx + \int \frac {2 A B b^{2} x^{2} \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\, dx + \int \frac {2 B^{2} a b x \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}^{2}}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\, dx + \int \frac {4 A B a b x \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\, dx\right )}{i^{3}}
\]
[In]
integrate((b*g*x+a*g)**2*(A+B*ln(e*((b*x+a)/(d*x+c))**n))**2/(d*i*x+c*i)**3,x)
[Out]
g**2*(Integral(A**2*a**2/(c**3 + 3*c**2*d*x + 3*c*d**2*x**2 + d**3*x**3), x) + Integral(A**2*b**2*x**2/(c**3 +
3*c**2*d*x + 3*c*d**2*x**2 + d**3*x**3), x) + Integral(B**2*a**2*log(e*(a/(c + d*x) + b*x/(c + d*x))**n)**2/(
c**3 + 3*c**2*d*x + 3*c*d**2*x**2 + d**3*x**3), x) + Integral(2*A*B*a**2*log(e*(a/(c + d*x) + b*x/(c + d*x))**
n)/(c**3 + 3*c**2*d*x + 3*c*d**2*x**2 + d**3*x**3), x) + Integral(2*A**2*a*b*x/(c**3 + 3*c**2*d*x + 3*c*d**2*x
**2 + d**3*x**3), x) + Integral(B**2*b**2*x**2*log(e*(a/(c + d*x) + b*x/(c + d*x))**n)**2/(c**3 + 3*c**2*d*x +
3*c*d**2*x**2 + d**3*x**3), x) + Integral(2*A*B*b**2*x**2*log(e*(a/(c + d*x) + b*x/(c + d*x))**n)/(c**3 + 3*c
**2*d*x + 3*c*d**2*x**2 + d**3*x**3), x) + Integral(2*B**2*a*b*x*log(e*(a/(c + d*x) + b*x/(c + d*x))**n)**2/(c
**3 + 3*c**2*d*x + 3*c*d**2*x**2 + d**3*x**3), x) + Integral(4*A*B*a*b*x*log(e*(a/(c + d*x) + b*x/(c + d*x))**
n)/(c**3 + 3*c**2*d*x + 3*c*d**2*x**2 + d**3*x**3), x))/i**3
Maxima [F]
\[
\int \frac {(a g+b g x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(c i+d i x)^3} \, dx=\int { \frac {{\left (b g x + a g\right )}^{2} {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )}^{2}}{{\left (d i x + c i\right )}^{3}} \,d x }
\]
[In]
integrate((b*g*x+a*g)^2*(A+B*log(e*((b*x+a)/(d*x+c))^n))^2/(d*i*x+c*i)^3,x, algorithm="maxima")
[Out]
A*B*a*b*g^2*n*((b*c^2 - 3*a*c*d + 2*(b*c*d - 2*a*d^2)*x)/((b*c*d^4 - a*d^5)*i^3*x^2 + 2*(b*c^2*d^3 - a*c*d^4)*
i^3*x + (b*c^3*d^2 - a*c^2*d^3)*i^3) + 2*(b^2*c - 2*a*b*d)*log(b*x + a)/((b^2*c^2*d^2 - 2*a*b*c*d^3 + a^2*d^4)
*i^3) - 2*(b^2*c - 2*a*b*d)*log(d*x + c)/((b^2*c^2*d^2 - 2*a*b*c*d^3 + a^2*d^4)*i^3)) + 1/2*A*B*a^2*g^2*n*((2*
b*d*x + 3*b*c - a*d)/((b*c*d^3 - a*d^4)*i^3*x^2 + 2*(b*c^2*d^2 - a*c*d^3)*i^3*x + (b*c^3*d - a*c^2*d^2)*i^3) +
2*b^2*log(b*x + a)/((b^2*c^2*d - 2*a*b*c*d^2 + a^2*d^3)*i^3) - 2*b^2*log(d*x + c)/((b^2*c^2*d - 2*a*b*c*d^2 +
a^2*d^3)*i^3)) + 1/2*A^2*b^2*g^2*((4*c*d*x + 3*c^2)/(d^5*i^3*x^2 + 2*c*d^4*i^3*x + c^2*d^3*i^3) + 2*log(d*x +
c)/(d^3*i^3)) - 2*(2*d*x + c)*A*B*a*b*g^2*log(e*(b*x/(d*x + c) + a/(d*x + c))^n)/(d^4*i^3*x^2 + 2*c*d^3*i^3*x
+ c^2*d^2*i^3) - (2*d*x + c)*A^2*a*b*g^2/(d^4*i^3*x^2 + 2*c*d^3*i^3*x + c^2*d^2*i^3) - A*B*a^2*g^2*log(e*(b*x
/(d*x + c) + a/(d*x + c))^n)/(d^3*i^3*x^2 + 2*c*d^2*i^3*x + c^2*d*i^3) - 1/2*A^2*a^2*g^2/(d^3*i^3*x^2 + 2*c*d^
2*i^3*x + c^2*d*i^3) + 1/2*(4*(b^2*c*d*g^2 - a*b*d^2*g^2)*B^2*x + (3*b^2*c^2*g^2 - 2*a*b*c*d*g^2 - a^2*d^2*g^2
)*B^2 + 2*(B^2*b^2*d^2*g^2*x^2 + 2*B^2*b^2*c*d*g^2*x + B^2*b^2*c^2*g^2)*log(d*x + c))*log((d*x + c)^n)^2/(d^5*
i^3*x^2 + 2*c*d^4*i^3*x + c^2*d^3*i^3) - integrate(-(2*B^2*a*b*d^2*g^2*x*log(e)^2 + B^2*a^2*d^2*g^2*log(e)^2 +
(B^2*b^2*d^2*g^2*log(e)^2 + 2*A*B*b^2*d^2*g^2*log(e))*x^2 + (B^2*b^2*d^2*g^2*x^2 + 2*B^2*a*b*d^2*g^2*x + B^2*
a^2*d^2*g^2)*log((b*x + a)^n)^2 + 2*(2*B^2*a*b*d^2*g^2*x*log(e) + B^2*a^2*d^2*g^2*log(e) + (B^2*b^2*d^2*g^2*lo
g(e) + A*B*b^2*d^2*g^2)*x^2)*log((b*x + a)^n) - (4*(b^2*c*d*g^2*n - (g^2*n - g^2*log(e))*a*b*d^2)*B^2*x + (3*b
^2*c^2*g^2*n - 2*a*b*c*d*g^2*n - (g^2*n - 2*g^2*log(e))*a^2*d^2)*B^2 + 2*(B^2*b^2*d^2*g^2*log(e) + A*B*b^2*d^2
*g^2)*x^2 + 2*(B^2*b^2*d^2*g^2*n*x^2 + 2*B^2*b^2*c*d*g^2*n*x + B^2*b^2*c^2*g^2*n)*log(d*x + c) + 2*(B^2*b^2*d^
2*g^2*x^2 + 2*B^2*a*b*d^2*g^2*x + B^2*a^2*d^2*g^2)*log((b*x + a)^n))*log((d*x + c)^n))/(d^5*i^3*x^3 + 3*c*d^4*
i^3*x^2 + 3*c^2*d^3*i^3*x + c^3*d^2*i^3), x)
Giac [F]
\[
\int \frac {(a g+b g x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(c i+d i x)^3} \, dx=\int { \frac {{\left (b g x + a g\right )}^{2} {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )}^{2}}{{\left (d i x + c i\right )}^{3}} \,d x }
\]
[In]
integrate((b*g*x+a*g)^2*(A+B*log(e*((b*x+a)/(d*x+c))^n))^2/(d*i*x+c*i)^3,x, algorithm="giac")
[Out]
integrate((b*g*x + a*g)^2*(B*log(e*((b*x + a)/(d*x + c))^n) + A)^2/(d*i*x + c*i)^3, x)
Mupad [F(-1)]
Timed out. \[
\int \frac {(a g+b g x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(c i+d i x)^3} \, dx=\int \frac {{\left (a\,g+b\,g\,x\right )}^2\,{\left (A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\right )}^2}{{\left (c\,i+d\,i\,x\right )}^3} \,d x
\]
[In]
int(((a*g + b*g*x)^2*(A + B*log(e*((a + b*x)/(c + d*x))^n))^2)/(c*i + d*i*x)^3,x)
[Out]
int(((a*g + b*g*x)^2*(A + B*log(e*((a + b*x)/(c + d*x))^n))^2)/(c*i + d*i*x)^3, x)